﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FizzDevelop
{
	public partial class SelectFromListDialog : Form
	{
		public SelectFromListDialog(IEnumerable<Object> list)
		{
			InitializeComponent();
			ListBox.Items.AddRange(list.ToArray());
		}

		public DialogResult ShowDialog(out Object selectedItem)
		{
			DialogResult result = base.ShowDialog();
			selectedItem = ListBox.SelectedItem;
			return result; 
		}
	}
}
